import java.io.*;

public class Main{
	public static void main(String[] args){
		try{
//			System.out.printf("%s",args[0]);

			BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
			System.out.println("input int:");
			int input=Integer.parseInt(buf.readLine());
			System.out.println("inpupt x 10="+(input*10));

			double data=10/0.0;

			System.out.println("double divid 0:"+data);

			if(String.valueOf(data).equals("Infinity")){
				throw new ArithmeticException("can't divid by 0");
			}
			
		}
		catch(ArithmeticException e){

			System.out.println("1-------");
			System.out.println(e);
			System.out.println("2-------");
			e.printStackTrace();
		}
		catch(IOException e){
			System.out.println("IO error");
		}	
		catch(NumberFormatException e){
			System.out.println("must be int !!!!");
		}
		catch(ArrayIndexOutOfBoundsException e){
			System.out.println("out of bounds");
			e.printStackTrace();
		}
		//put in final for unknow bug
		catch(Exception e){
			System.out.println(e.toString());
		}
		finally{
			System.out.println("");
			System.out.println("finlalllllllly");

		}
	}


}